<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

	<!--
	main html banner
	-->
    <xsl:template name="banner">

        <table width="100%">

			<!-- buttons -->
            <tr class="banner" style="background-color: black">
                <td align="right" class="banner-menu" colspan="2">
                    <a class="banner" href="{/root/gui/locService}/main.home">
                        <xsl:value-of select="/root/gui/strings/home"/>
                    </a>
					|
                    <xsl:if test="string(/root/gui/results)!=''">
                        <xsl:choose>
                            <xsl:when test="/root/gui/reqService='main.present'">
                                <font class="banner-active">
                                    <xsl:value-of select="/root/gui/strings/result"/>
                                </font>
                            </xsl:when>
                            <xsl:otherwise>
                                <a class="banner" href="{/root/gui/locService}/main.present">
                                    <xsl:value-of select="/root/gui/strings/result"/>
                                </a>
                            </xsl:otherwise>
                        </xsl:choose>
						|
                    </xsl:if>
                    <xsl:choose>
                        <xsl:when test="/root/gui/reqService='feedback'">
                            <font class="banner-active">
                                <xsl:value-of select="/root/gui/strings/contactUs"/>
                            </font>
                        </xsl:when>
                        <xsl:otherwise>
                            <a class="banner" href="{/root/gui/locService}/feedback">
                                <xsl:value-of select="/root/gui/strings/contactUs"/>
                            </a>
                        </xsl:otherwise>
                    </xsl:choose>
					|
                    <xsl:choose>
                        <xsl:when test="/root/gui/reqService='about'">
                            <font class="banner-active">
                                <xsl:value-of select="/root/gui/strings/about"/>
                            </font>
                        </xsl:when>
                        <xsl:otherwise>
                            <a class="banner" href="{/root/gui/locService}/about">
                                <xsl:value-of select="/root/gui/strings/about"/>
                            </a>
                        </xsl:otherwise>
                    </xsl:choose>
					|
<!--					<xsl:choose>
						<xsl:when test="/root/gui/reqService='help'">
							<font class="banner-active"><xsl:value-of select="/root/gui/strings/help"/></font>
						</xsl:when>
						<xsl:otherwise>
							<a class="banner" href="{/root/gui/locService}/help"><xsl:value-of select="/root/gui/strings/help"/></a>
						</xsl:otherwise>
					</xsl:choose> -->

                    <a class="banner" href="{/root/gui/url}/docs/index.html" target="_blank">
                        <xsl:value-of select="/root/gui/strings/help"/>
                    </a>
                        |
                    <xsl:choose>
                        <xsl:when test="/root/gui/language='en'">
                            <font class="banner-active">
                                <xsl:value-of select="/root/gui/strings/en"/>
                            </font>
                        </xsl:when>
                        <xsl:otherwise>
                            <a class="banner" href="{/root/gui/service}/en/main.home">
                                <xsl:value-of select="/root/gui/strings/en"/>
                            </a>
                        </xsl:otherwise>
                    </xsl:choose>
					|
                    <xsl:choose>
                        <xsl:when test="/root/gui/language='fr'">
                            <font class="banner-active">
                                <xsl:value-of select="/root/gui/strings/fr"/>
                            </font>
                        </xsl:when>
                        <xsl:otherwise>
                            <a class="banner" href="{/root/gui/service}/fr/main.home">
                                <xsl:value-of select="/root/gui/strings/fr"/>
                            </a>
                        </xsl:otherwise>
                    </xsl:choose>
					|
                    <xsl:choose>
                        <xsl:when test="/root/gui/language='es'">
                            <font class="banner-active">
                                <xsl:value-of select="/root/gui/strings/es"/>
                            </font>
                        </xsl:when>
                        <xsl:otherwise>
                            <a class="banner" href="{/root/gui/service}/es/main.home">
                                <xsl:value-of select="/root/gui/strings/es"/>
                            </a>
                        </xsl:otherwise>
                    </xsl:choose>
					|
                    <xsl:choose>
                        <xsl:when test="/root/gui/language='cn'">
                            <font class="banner-active">
                                <xsl:value-of select="/root/gui/strings/cn"/>
                            </font>
                        </xsl:when>
                        <xsl:otherwise>
                            <a class="banner" href="{/root/gui/service}/cn/main.home">
                                <xsl:value-of select="/root/gui/strings/cn"/>
                            </a>
                        </xsl:otherwise>
                    </xsl:choose>
                    <xsl:if test="string(/root/gui/session/userId)!=''">
                        |
                        <a class="banner-active" style="color: white; font-weight: bold" href="#" onclick="logout2.submit();">
                            <xsl:value-of select="/root/gui/strings/logout"/>
                        </a>
                        <form name="logout2" action="{/root/gui/locService}/user.logout" method="post">
                        </form>
                    </xsl:if>
                </td>
            </tr>
			<!-- title -->
            <tr class="banner">
                <td class="banner" style="background: transparent url(/geonetwork/images/header_bg.jpg) repeat-x scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; width: auto; white-space: nowrap; padding-bottom: 0px; vertical-align: bottom;">
                    <img src="{/root/gui/url}/images/header-left.jpg" alt="World picture" align="top" />
                </td>
                <td align="right" class="banner" style="background: transparent url(/geonetwork/images/header_bg.jpg) repeat-x scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; width: auto; white-space: nowrap; padding-bottom: 0px; vertical-align: bottom;">
                    <img src="{/root/gui/url}/images/header-right.gif" alt="GeoNetwork opensource logo" align="top" />
                </td>
            </tr>


			<!-- FIXME: should also contain links to last results and metadata -->

        </table>
        <table width="100%" style="margin-top: 3px; margin-bottom: 3px;">
            <tr class="banner" >
                <td style="color: #999999; font-size: 11px">
                   Multimedia
                   |
                   Foros
                   |
                   Noticias
                   |
                   Eventos
                   |
                   Enlaces
                   |
                   Registro
                   |
                   Encuestas en Línea
                </td>
                <td align="right" style="color: #999999; font-size: 11px">
                   Buscar
                    <input type="text"/>
                </td>
            </tr>
        </table>
        <table width="100%">
            <tr class="banner">
                <td width="70%" style="background-color: black">
                    <br/>
                </td>
                <td align="right" vertical-align="bottom" colspan="2">
                    <div style="background: transparent url({/root/gui/url}/images/bg_vertical.jpg) repeat-y scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; width: 600px; height: 15px; white-space: nowrap; padding-bottom: 0px; vertical-align: bottom; color: #ffffff; " align="right">
                        <xsl:if test="string(/root/gui/session/userId)!=''">
                            <xsl:choose>
                                <xsl:when test="/root/gui/reqService='group.list'">
                                    <font class="banner-active">
                                        <xsl:value-of select="/root/gui/strings/admin"/>
                                    </font>
                                </xsl:when>
                                <xsl:otherwise>
                                    <a class="banner" href="{/root/gui/locService}/group.list">
                                        <xsl:value-of select="/root/gui/strings/admin"/>
                                    </a>
                                </xsl:otherwise>
                            </xsl:choose>
						|
                            <xsl:choose>
                                <xsl:when test="/root/gui/reqService='category.list'">
                                    <font class="banner-active">
                                        <xsl:value-of select="/root/gui/strings/contentAdmin"/>
                                    </font>
                                </xsl:when>
                                <xsl:otherwise>
                                    <a class="banner" href="{/root/gui/locService}/category.list">
                                        <xsl:value-of select="/root/gui/strings/contentAdmin"/>
                                    </a>
                                </xsl:otherwise>
                            </xsl:choose>
						|
                        <!--xsl:value-of select="/root/gui/reqService"/-->
                            <xsl:choose>
                                <xsl:when test="/root/gui/reqService='metadata.create.form'">
                                    <font class="banner-active">
                                        <xsl:value-of select="/root/gui/strings/metadata"/>
                                    </font>
                                </xsl:when>
                                <xsl:otherwise>
                                    <a class="banner" href="{/root/gui/locService}/metadata.create.form">
                                        <xsl:value-of select="/root/gui/strings/metadata"/>
                                    </a>
                                </xsl:otherwise>
                            </xsl:choose>
						|
                        </xsl:if>
                        <xsl:choose>
                            <xsl:when test="/root/gui/reqService='main.home'">
                                <font class="banner-active">
                                    <xsl:value-of select="/root/gui/strings/simple"/>
                                </font>
                            </xsl:when>
                            <xsl:otherwise>
                                <a class="banner" onclick="showAdvancedSearch()" href="{/root/gui/locService}/main.home">
                                    <xsl:value-of select="/root/gui/strings/simple"/>
                                </a>
                            </xsl:otherwise>
                        </xsl:choose>
                            |
                        <xsl:if test="string(/root/gui/session/userId)!=''">
                            <xsl:choose>
                                <xsl:when test="/root/gui/reqService='harvesting'">
                                    <font class="banner-active">
                                        <xsl:value-of select="/root/gui/strings/ICDENode"/>
                                    </font>
                                </xsl:when>
                                <xsl:otherwise>
                                    <a class="banner" href="{/root/gui/locService}/harvesting">
                                        <xsl:value-of select="/root/gui/strings/ICDENode"/>
                                    </a>
                                </xsl:otherwise>
                            </xsl:choose>
                        </xsl:if>
                    </div>
                </td>
            </tr>
        </table>
    </xsl:template>

	<!--
	main html banner in a popup window
	-->
    <xsl:template name="bannerPopup">

        <table width="100%">

			<!-- title -->
			<!-- TODO : Mutualize with main banner template -->
            <tr class="banner">
                <td class="banner">
                    <img src="{/root/gui/url}/images/header-left.jpg" alt="GeoNetwork opensource" align="top" />
                </td>
                <td align="right" class="banner">
                    <img src="{/root/gui/url}/images/header-right.gif" alt="World picture" align="top" />
                </td>
            </tr>

			<!-- buttons -->
            <tr class="banner">
                <td class="banner-menu" colspan="2">
                </td>
            </tr>

            <tr class="banner">
                <td class="banner-login" colspan="2">
                </td>
            </tr>
        </table>
    </xsl:template>


</xsl:stylesheet>

